//401 JWT expired错误退出登录
var isHomeBack = true;
$.ajaxSetup({
  timeout: 120000,
  complete: function(xhr) {
    if(isHomeBack){
      if(xhr.responseJSON ){
        if ( xhr.responseJSON.message == 'JWT expired' || xhr.responseJSON.code === '42501') {
          isHomeBack = false;
          destroyAllCache(localStg)
          alert('token过期,请重新登录');
          window.location.href = './index.html'
        }
      }else{
        console.error(xhr,'有点错误')
      }
    }
  }
});
